package org.zbclan.bf2.rcon.query;

import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Singleton;
import com.google.inject.servlet.GuiceServletContextListener;
import com.google.inject.servlet.ServletModule;

/**
 * @author renfeng
 * 
 */
public class QueryServletConfig extends GuiceServletContextListener {

	@Override
	protected Injector getInjector() {

		ServletModule servletModule = new ServletModule() {

			@Override
			protected void configureServlets() {

				serve("/query/local-profile").with(LocalProfileServlet.class);
				bind(LocalProfileServlet.class).in(Singleton.class);

				return;
			}
		};

		return Guice.createInjector(servletModule);
	}
}
